package info.fqtech.interview.thread;

/**
 * @author: jack
 * @date: 2018/12/18 18:1203
 * @version: 0.1
 * @description: <文件的作用>
 * @modified: <修改说明>
 **/
public class ThreadWorker1 implements Runnable {

    private int sleepSeconds = 0;

    public ThreadWorker1(int sleepSeconds) {
        this.sleepSeconds = sleepSeconds;
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + ":" + "开始执行--"+ this.sleepSeconds +"秒");
        try {
            Thread.sleep(this.sleepSeconds * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName() + ":" + "开始执行--"+ this.sleepSeconds +"秒结束");
    }
}
